<template>
    <div class="main_box" style="padding:10px">
        <div class="add_wrap">
            <el-form label-width="200px">
                <div class="tit">
                    <h2>基础信息</h2>
                    <el-button type="success" plain size="small" icon="fa fa-mail-forward" @click="returnList">返回
                    </el-button>
                </div>
                <el-row>
                    <el-form-item label="商户名称:">
                        <span>{{ dataInfo.organName }}</span>
                    </el-form-item>
                    <!-- <el-form-item label="商户类型:">
                        <span>{{ formatOrganType(dataInfo.organType) }}</span>
                    </el-form-item> -->
                    <el-form-item label="商户号:">
                        <span>{{ dataInfo.appKey}}</span>
                    </el-form-item>
                    <el-form-item label="商户密钥:">
                        <span>{{ dataInfo.appSecret }}</span>
                    </el-form-item>
                    <el-form-item label="访问令牌:">
                        <span>{{ dataInfo.accessToken }}</span>
                    </el-form-item>
                  <el-form-item label="数据加密方式:">
                    <span>{{ dataInfo.signMethod }}</span>
                  </el-form-item>
                    <el-form-item label="令牌有效时长:">
                        <span>{{ dataInfo.vaildDay }}天</span>
                    </el-form-item>
                    <el-form-item label="访问令牌过期时间:">
                        <span>{{ dataInfo.accessExpires }}</span>
                    </el-form-item>
                    <el-form-item label="联系人:">
                        <span>{{ dataInfo.linkMan }}</span>
                    </el-form-item>
                    <el-form-item label="联系电话:">
                        <span>{{ dataInfo.linkPhone }}</span>
                    </el-form-item>
                    <el-form-item label="联系地址:">
                        <span>{{ dataInfo.linkAddr }}</span>
                    </el-form-item>
                    <el-form-item label="创建人:">
                        <span>{{ dataInfo.createUserName }}</span>
                    </el-form-item>
                    <el-form-item label="创建时间:">
                        <span>{{ dataInfo.createDate }}</span>
                    </el-form-item>
                    <el-form-item label="修改人:">
                        <span>{{ dataInfo.modifyUserName }}</span>
                    </el-form-item>
                    <el-form-item label="修改时间:">
                        <span>{{ dataInfo.modifyDate }}</span>
                    </el-form-item>
                    <el-form-item label="备注:">
                        <span>{{ dataInfo.remark }}</span>
                    </el-form-item>
                </el-row>
            </el-form>
        </div>
    </div>
  </template>

  <script>
  import OrganAuthApi from '@/api/organ/organAuth';
  export default {
    data() {
        return {
            dataInfo: {},
        };
    },
    computed: {
    },
    mounted() {
        this.getData()
    },
    methods: {
      async getData() {
        const {data} = await OrganAuthApi.getOrganAuthInfo({organId:this.$route.query.id})
        this.dataInfo = data
      },
    //   formatOrganType(type){
    //     switch(type){
    //         case "1":
    //             return "医院"
    //         case "2":
    //             return "医检"
    //         case "10":
    //             return "其它"
    //     }
    //   },
      returnList() {
        this.$store.dispatch('delView', this.$route);
        this.$router.push({ path: '/organ/organAuthManagement' })
      }
    },

  }

  </script>
<style lang="scss" scoped>
@import "@/assets/css/views/add.scss";
</style>
